﻿using System;
using System.Collections.Generic;
using System.Text;
using HAVNet.Core.String;


namespace HAVNet.Intros.AST
{
    public class ASTAttributeArguments : List<ASTAttributeArgument>
    {
        public override string ToString ()
        {
            if (this.Count > 0)
                return Strings.joinobjs(", ", this);
            else
                return "";
        }
    }

    public class ASTAttributeArgument : ASTNode
    {
        public string           ident       { get; set; }
        public ASTExpr    expression  { get; set; }

        public override string ToString ()
        {
            if (! string.IsNullOrEmpty( ident))
                return ident + " = " + expression.ToString();
            else
                return expression.ToString();
        }
    }
}
